package org.komarichin;

import ognl.OgnlRuntime;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Created by IntelliJ IDEA.
 * User: mikom
 * Date: 18.09.2009
 * Time: 23:14:44
 */
public class OgnlListener implements ServletContextListener, HttpSessionListener, HttpSessionAttributeListener {
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        OgnlRuntime.setSecurityManager(null);
    }

    public void contextDestroyed(ServletContextEvent servletContextEvent) {
//        OgnlRuntime.setSecurityManager(null);
    }

    public void sessionCreated(HttpSessionEvent httpSessionEvent) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void attributeAdded(HttpSessionBindingEvent httpSessionBindingEvent) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void attributeRemoved(HttpSessionBindingEvent httpSessionBindingEvent) {
        //To change body of implemented methods use File | Settings | File Templates.
    }

    public void attributeReplaced(HttpSessionBindingEvent httpSessionBindingEvent) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
